//    Copyright (C) Kherty.  All rights reserved.
using System.IO;
using System.IO.Packaging;
using System.Xml;

namespace OpenLS.Core.Serialization
{
    public class RelatedWriteContext: WriteContext
    {
        internal RelatedWriteContext(string prefix, string namespaceUri,
            XmlWriter writer, PackagePart part, Stream stream, PackageRelationship relationship)
            : base(prefix, namespaceUri, writer, part)
        {
            this.stream = stream;
            rel = relationship;
        }
        public override void Dispose()
        {
            //\\base.Dispose();
            Writer.Close();
            stream.Close();
        }

        readonly Stream stream;
        private readonly PackageRelationship rel;

	public PackageRelationship Relationship
	{
		get { return rel;}
	}
	
    }
}
